/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.svh.Entidad;

import com.svh.Utils.Exporter;
import java.io.Serializable;
import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 *
 * @author David
 */
@Entity
@Table(name = "vehiculo")
public class Vehiculo implements Serializable, Exporter {

    @Id
    @GeneratedValue
    @Column(name = "idVehiculo", unique = true, nullable = false)
    Integer id;

    @Column(name = "marca")
    String marca;

    @Column(name = "modelo")
    String modelo;

    @Column(name = "carga")
    String carga;

    @Column(name = "matricula")
    String matricula;

    @Column(name = "fecha_adquisicion", insertable = false)
    Timestamp fechaAdquisicion;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getMarca() {
        return marca;
    }

    public void setMarca(String marca) {
        this.marca = marca;
    }

    public String getModelo() {
        return modelo;
    }

    public void setModelo(String modelo) {
        this.modelo = modelo;
    }

    public String getCarga() {
        return carga;
    }

    public void setCarga(String carga) {
        this.carga = carga;
    }

    public String getMatricula() {
        return matricula;
    }

    public void setMatricula(String matricula) {
        this.matricula = matricula;
    }

    public Timestamp getFechaAdquisicion() {
        return fechaAdquisicion;
    }

    public void setFechaAdquisicion(Timestamp fechaAdquisicion) {
        this.fechaAdquisicion = fechaAdquisicion;
    }

    @Override
    public String[] getDatos() {
        String[] datos = new String[4];
        datos[0] = "" + this.marca;
        datos[1] = "" + this.modelo;
        datos[2] = "" + this.carga;
        datos[3] = "" + this.matricula;
        return datos;
    }

    @Override
    public String[] getTitulos() {
return new String[]{"Marca","Modelo","Carga","Matricula"};        
    }

}
